package com.quick.domain;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;

/**
 * 功能描述 TODO
 *
 * @Created Time 2017/9/11
 * @Edited Time 2017/9/11
 * @Created by wangxin43
 */
@Data
public class Book {
    @NotNull(message = "id不能为空")
    private Long id;
    @NotEmpty (message = "name不能为空")
    @Length(min = 5,max = 20,message = "长度错误")
    private String name;
    @NotNull(message = "isbn不能为空")
    private String isbn;
    @DecimalMin(value = "0.1",message = "单价最低为0.1")
    private double price;
}
